import { Component } from '@angular/core';
import { IonicPage, NavController, NavParams } from 'ionic-angular';

/**
 * Generated class for the WebviewPage page.
 *
 * See http://ionicframework.com/docs/components/#navigation for more info
 * on Ionic pages and navigation.
 */

@Component({
  selector: 'page-webview',
  templateUrl: 'webview.html',
})
export class WebviewPage {


  constructor(public navCtrl: NavController, public navParams: NavParams) {
    
  }

  ionViewDidLoad() {
    console.log('ionViewDidLoad WebviewPage');
    // var h=document.getElementById("webvp");
    // var z=document.getElementById("navbarion");
    // // console.log(h);
    // // h.style.height=h.style.height"56px";
   
    // // console.log("a="+a+"b="+b);
    // var a=z.offsetHeight  ;
    // h.style.height=h.offsetHeight-a+"px";
    // h.style.position="absolute";
    // h.style.top=a+"px";
  }



  ionViewWillEnter(){
    
    // var h=document.getElementById("webvp");
    // var z=document.getElementById("navbarion");
    // var a=z.offsetHeight  ;
    // h.style.height=h.offsetHeight+this.navCtrl.parent.tabbar.height+"px";
  
    // console.log(this.navCtrl.parent.style.height);


    let elements = document.querySelectorAll(".tabbar");
    if(elements != null) {
        Object.keys(elements).map((key) => {
            elements[key].style.display ='none';
            // h.style.height=h.offsetHeight+elements[key].style.height+"px";
            // console.log(elements[key].style.height);
        });
    }   
  
  


  }


  ionViewWillLeave() {
    let elements = document.querySelectorAll(".tabbar");
    if(elements != null) {
        Object.keys(elements).map((key) => {
            elements[key].style.display ='flex';
        });
    }
  }   
}
